package com.weipai;




/**
 * Created by Administrator on 2017/11/11 0011.
 */
public class RunnableDemo implements Runnable {

    private Thread t;
    private String threadName;

    RunnableDemo(String name) {
        threadName = name;
        System.out.println("Creating " +  threadName );
    }

    public void run() {
        Consumers consumers = new  Consumers();
        consumers.Consouremerqenue();
    }

    public void start () {
        System.out.println("Starting " +  threadName );
        if (t == null) {
            t = new Thread (this, threadName);
            t.start ();
        }
    }
}
